package me.firstapp.module.weixin.transfer;

import java.math.BigDecimal;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import me.firstapp.module.base.BaseEntity;

@Entity
@Table(name = "TRANSFER_MEMBER_PRODUCT")
public class TransferMemberProduct extends BaseEntity {

	private static final long serialVersionUID = -2608313849870873189L;

	public static final int STATUS_OFF = 0;
	public static final int STATUS_ON = 1;
	public static final int STATUS_SELLED = 2;

	// 转让者openID
	@Column(name = "OWN_OPEN_ID", length = 40, nullable = false)
	private String ownOpenId;

	// 转让者卡号
	@Column(name = "OWN_CARD_NO", length = 40, nullable = false)
	private String ownCardNo;

	// 转让者名称
	@Column(name = "OWN_NAME", length = 40, nullable = false)
	private String ownName;

	// 图片
	@Column(name = "IMG_URL", length = 500, nullable = false)
	private String imgUrl;

	// 名称
	@Column(name = "NAME", length = 100, nullable = false)
	private String name;

	// 转让金额
	@Column(name = "AMOUNT", columnDefinition = "DECIMAL(11, 4)", nullable = false)
	private BigDecimal amount;

	// 转让数量
	@Column(name = "COUNTS", nullable = false)
	private Integer counts;

	// 状态，0下架，1上架，2已售
	@Column(name = "STATUS", columnDefinition = " TINYINT ", nullable = false)
	private Integer status;

	// 申请时间
	@Column(name = "APPLY_TIME", columnDefinition = "DATETIME", nullable = false)
	private Date applyTime;

	// 下架时间
	@Column(name = "OFF_TIME", columnDefinition = "DATETIME")
	private Date offTime;

	// 已售时间
	@Column(name = "SALE_TIME", columnDefinition = "DATETIME")
	private Date saleTime;

	public String getOwnOpenId() {
		return ownOpenId;
	}

	public void setOwnOpenId(String ownOpenId) {
		this.ownOpenId = ownOpenId;
	}

	public String getOwnCardNo() {
		return ownCardNo;
	}

	public void setOwnCardNo(String ownCardNo) {
		this.ownCardNo = ownCardNo;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public Integer getCounts() {
		return counts;
	}

	public void setCounts(Integer counts) {
		this.counts = counts;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getApplyTime() {
		return applyTime;
	}

	public void setApplyTime(Date applyTime) {
		this.applyTime = applyTime;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getOwnName() {
		return ownName;
	}

	public void setOwnName(String ownName) {
		this.ownName = ownName;
	}

	public Date getOffTime() {
		return offTime;
	}

	public void setOffTime(Date offTime) {
		this.offTime = offTime;
	}

	public Date getSaleTime() {
		return saleTime;
	}

	public void setSaleTime(Date saleTime) {
		this.saleTime = saleTime;
	}

}
